home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADTK.IN_ / oemnadtk.inf
INI File  |  1996-07-12  |  34KB  |  894 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     PCMCIA
  7.     "Jazz-Internal Bus"
  8. [Options]
  9.     IBMTOK
  10. [GeneralConstants]
  11. from      = ""
  12. to        = ""
  13. retaddr   = ""
  14. KeyNull         = ""
  15. StringNull      = ""
  16. MAXIMUM_ALLOWED   = 33554432
  17. RegistryErrorIndex = NO_ERROR
  18. KeyProduct      = ""
  19. KeyParameters   = ""
  20. TRUE            = 1
  21. FALSE           = 0
  22. NoTitle            = 0
  23. ExitState   = "Active"
  24. OldVersionExisted = $(FALSE)
  25. DriverPath      = $(!STF_NTPATH)\drivers
  26. [FileConstants]
  27. UtilityInf      = "UTILITY.INF"
  28. ParamInf        = "NCPARAM.INF"
  29. subroutineinf   = "SUBROUTN.INF"
  30. SoftwareType    = "driver"
  31. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  32. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  33. SpeedList = {16,4}
  34. Manufacturer    = "Microsoft"
  35. ProductMajorVersion     = "4"
  36. ProductMinorVersion     = "0"
  37. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  38. ProductSoftwareName     = "IbmTok"
  39. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ibmtok.sys"
  40. NetRuleSoftwareType     = "ibmtokSys ndisDriver ibmtokDriver"
  41. NetRuleSoftwareUse      = $(SoftwareType)
  42. NetRuleSoftwareBindForm = """IBMTokSys"" yes no container"
  43. NetRuleSoftwareClass    = {"ibmtokDriver basic"}
  44. ProductHardwareName     = "IbmTok"
  45. NetRuleHardwareType     = "ibmtok ibmtokAdapter"
  46. NetRuleHardwareBindForm = " yes yes container"
  47. NetRuleHardwareClass    = {"ibmtokAdapter basic"}
  48. ProductOpSupport     = 134 
  49. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  50. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  51. [date]
  52.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  53. [Identify]
  54.     read-syms Identification
  55.     set Status     = STATUS_SUCCESSFUL
  56.     set Identifier = $(OptionType)
  57.     set Media      = #("Source Media Descriptions", 1, 1)
  58.     Return $(Status) $(Identifier) $(Media)
  59. [ReturnOptions]
  60.     set Status        = STATUS_FAILED
  61.     set OptionList     = {}
  62.     set OptionTextList = {}
  63.     set LanguageList = ^(LanguagesSupported, 1)
  64.     Ifcontains(i) $($0) in $(LanguageList)
  65.         ifstr(i) $($1) == ""
  66.            goto returnoptions
  67.         endif
  68.         set PlatformList = ^(PlatformsSupported, 1)
  69.         Ifcontains(i) $($1) in $(PlatformList)
  70.            goto returnoptions
  71.         else
  72.            set Status = STATUS_NOTSUPPORTED
  73.            goto finish_ReturnOptions
  74.         endif
  75.     else
  76.         set Status = STATUS_NOLANGUAGE
  77.         goto finish_ReturnOptions
  78.     endif
  79. returnoptions = +
  80.     set OptionList     = ^(Options, 1)
  81.     set OptionTextList = ^(OptionsText$($0), 1)
  82.     set Status         = STATUS_SUCCESSFUL
  83. finish_ReturnOptions = +
  84.     Return $(Status) $(OptionList) $(OptionTextList)
  85. [InstallOption]
  86.     set Option   = $($1)
  87.     set SrcDir   = $($2)
  88.     set AddCopy  = $($3)
  89.     set DoCopy   = $($4)
  90.     set DoConfig = $($5)
  91.     set LanguageList = ^(LanguagesSupported, 1)
  92.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  93.         Return STATUS_NOLANGUAGE
  94.     endif
  95.     Debug-Output "OEMNADTK.INF: STF_CWDIR is: "$(!STF_CWDIR)
  96.     set-subst LF = "\n"
  97.     read-syms GeneralConstants
  98.     read-syms FileConstants
  99.     Shell $(UtilityInf), GetBindingInfo, "IBM"
  100.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  101.         Debug-Output "ShellCode error: cannot get an error string."
  102.         goto ShellCodeError
  103.     endif
  104.     set NetRuleSoftwareBindable = $($R1)
  105.     read-syms DialogConstants$(!STF_LANGUAGE)
  106.     ifstr(i) $(!NTN_Origination) == "NCPA"
  107.         set Continue = $(OK)
  108.     endif
  109.     read-syms FileConstants$(!STF_LANGUAGE)
  110.     detect date
  111.     set-title  $(FunctionTitle)
  112.     set to   = Begin
  113.     set from = Begin
  114.     set CommonStatus = STATUS_SUCCESSFUL
  115.     EndWait
  116. Begin = +
  117.     set ActivateDetection = FALSE
  118.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  119.         set StartLabel = removeadapter
  120.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  121.         set StartLabel = bindingadapter
  122.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  123.         set StartLabel = UpgradeSoftware
  124.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  125.         set CommonStatus = STATUS_REBOOT
  126.         set ActivateDetection = TRUE
  127.         set StartLabel = configureadapter
  128.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  129.             Debug-Output "Cannot configure the IBM software."
  130.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  131.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  132.                 Debug-Output "ShellCode error: cannot get an error string."
  133.                 goto ShellCodeError
  134.             endif
  135.             set Error = $($R0)
  136.             set from = end
  137.             set to = end
  138.             goto nonfatalinfo
  139.         endif
  140.     else
  141.         set StartLabel = installadapter
  142.         set OEM_ABANDON_OPTIONS = {}
  143.         set OEM_ABANDON_SOFTWARE = FALSE
  144.         set OEM_ABANDON_ON = TRUE
  145.         set ActivateDetection = TRUE
  146.     endif
  147.     set IOBaseAddress = 1
  148.     Debug-Output "OEMNADTK.INF: =================================================="
  149.     Debug-Output "OEMNADTK.INF: STF_CWDIR is: "$(!STF_CWDIR)
  150.     Debug-Output "OEMNADTK.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  151.     Debug-Output "OEMNADTK.INF: Option is: "$(Option)
  152.     Debug-Output "OEMNADTK.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  153.     Debug-Output "OEMNADTK.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  154.     Debug-Output "OEMNADTK.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  155.     Debug-Output "OEMNADTK.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  156.     Debug-Output "OEMNADTK.INF: =================================================="
  157.     Set DetectedCard = FALSE
  158.     set CardType = 1
  159.     set Pcmcia  = FALSE
  160.     Ifstr(i) $(ActivateDetection) != TRUE
  161.         Goto skipdetection
  162.     Endif
  163.     Set TypeList = {{IOADDR, IOADDR_Addr_List, IOBaseAddress},+
  164.                     {IRQ, IRQList, Token1IRQVal},+
  165.                     {MEMADDR, MMIODecList, Token1MMIOVal}}
  166.     Debug-Output "OEMNADTK.INF: Calling Param_BuildTypeLists"
  167.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  168.     Set Status = $($R0)
  169.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  170.         Goto fataldetect
  171.     Endif
  172.     Debug-Output "OEMNADTK.INF: Calling Param_SetDefaults"
  173.     Shell $(ParamInf) Param_SetDefaults {}
  174.     Shell $(ParamInf) HexListFromDecList $(MMIODecList)
  175.     Set MMIOList = $($R0)
  176.     Shell $(UtilityInf) SortList $(SpeedList) TRUE FALSE
  177.     Set Combo1List = $($R0)
  178.     Shell $(UtilityInf) SortList $(IRQList) TRUE FALSE
  179.     Set Combo2List = $($R0)
  180.     Shell $(UtilityInf) SortList $(MMIOList) TRUE FALSE
  181.     Set Combo3List = $($R0)
  182.     Ifstr(i) $(!STF_NCDETECT) == YES
  183.         Ifstr(i) $(!STF_NCOPTION) == $(Option)
  184.            Set DetectedCard = TRUE
  185.            Debug-Output "OEMNADTK.INF: Setting DetectedCard to TRUE"
  186.         Endif
  187.     Endif
  188. skipdetection =+
  189.     set from = $(fatal)
  190.     set to = $(fatal)
  191.     goto $(StartLabel)
  192. installadapter = +
  193.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  194.     Ifstr $(KeyProduct) != $(KeyNull)
  195.         CloseRegKey $(KeyProduct)
  196.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  197.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  198.                $(ProductVersion)
  199.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  200.                Debug-Output "ShellCode error: cannot get an error string."
  201.                goto ShellCodeError
  202.            endif
  203.            goto end
  204.         else
  205.            Shell $(UtilityInf), CardExistedDlg
  206.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  207.                Debug-Output "ShellCode error: cannot get an error string."
  208.                goto ShellCodeError
  209.            endif
  210.            ifstr(i) $($R1) != "OK"
  211.                set CommonStatus = STATUS_USERCANCEL
  212.                goto end
  213.            endif
  214.            set OldVersionExisted = $(TRUE)
  215.         endif
  216.     endif
  217.     Ifstr(i) $(DetectedCard) != TRUE
  218.         Goto adaptersetup
  219.     Endif
  220.     StartWait
  221.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  222.     EndWait
  223.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  224.         Goto adaptersetup
  225.     Endif
  226.     Set DetectedParams = $($R1)
  227.     Debug-Output "OEMNADTK.INF: Calling Param_SetDefaults to merge detected params"
  228.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  229.     goto adapteroptions
  230. configureadapter = +
  231.     Ifstr $(KeyProduct) == $(KeyNull)
  232.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  233.         Ifstr $(KeyProduct) == $(KeyNull)
  234.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  235.             Debug-Output "Cannot find component product key"
  236.             goto fatalregistry
  237.         Endif
  238.     Endif
  239.     Debug-Output "OEMNADTK.INF: Shelling to FindService"
  240.     Shell $(UtilityInf) FindService, $(KeyProduct)
  241.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  242.         Debug-Output "OEMNADTK.INF: FindService shell failure"
  243.         Goto ShellCodeError
  244.     Endif
  245.     Ifstr(i) $($R0) != NO_ERROR
  246.         Debug-Output "OEMNADTK.INF: FindService Shell error: "$($R0)
  247.         Goto fatalregistry
  248.     endif
  249.     set KeyParameters = $($R2)
  250.     CloseRegKey $($R1)
  251.     Ifstr $(KeyParameters) == $(KeyNull)
  252.         set RegistryErrorIndex = "CANNOT_FIND_COMPONENT_SERVICE"
  253.         Debug-Output "Cannot find component service"
  254.         goto fatalregistry
  255.     endif
  256.     set OldVersionExisted = $(TRUE )
  257.     set ValueName = ""
  258.     set ValueData = ""
  259.     set ValueStr  = ""
  260.     set ValueList = {}
  261.     EnumRegValue $(KeyParameters) ValueList
  262.     ForListDo $(ValueList)
  263.         set ValueItem = $($)
  264.         set ValueName = *($(ValueItem),1)
  265.         set ValueData = *($(ValueItem),4)
  266.         Ifstr(i) $(ValueName) == "IOBaseAddress"
  267.            set IOBaseAddress = $(ValueData)
  268.         else-Ifstr(i) $(ValueName) == "NetworkAddress"
  269.            set NetworkAddress = $(ValueData)
  270.         else-ifstr(i) $(ValueName) == "BusType"
  271.             set BusInterfaceType = $(ValueData)
  272.         else-ifstr(i) $(ValueName) == "BusNumber"
  273.             set BusNumber = $(ValueData)
  274.         else-ifstr(i) $(ValueName) == "InterruptNumber"
  275.            set Token1IRQVal = $(ValueData)
  276.         else-ifstr(i) $(ValueName) == "RingSpeed"
  277.             set Token1Speed = $(ValueData)
  278.         else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress"
  279.             set Token1MMIOVal = $(ValueData)
  280.         else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress_1"
  281.             set Token1RAM = $(ValueData)
  282.         else-ifstr(i) $(ValueName) == "MemoryMappedSize"
  283.             set Token1MMIOSize = $(ValueData)
  284.         else-ifstr(i) $(ValueName) == "MemoryMappedSize_1"
  285.             set Token1RAMSize = $(ValueData)
  286.         else-ifstr(i) $(ValueName) == "Pcmcia"
  287.             set Pcmcia = $(ValueData)
  288.         endif
  289.     EndForListDo
  290.     ifstr(i) $(IOBaseAddress) == 2592
  291.         set IOBaseAddress = 1
  292.     else-ifstr(i) $(IOBaseAddress) == 2596
  293.         set IOBaseAddress = 2
  294.     else-ifstr(i) $(IOBaseAddress) == ""
  295.         set IOBaseAddress = 1
  296.     endif
  297. adaptersetup =+
  298.     Shell $(ParamInf) Param_ParameterConfidence
  299.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  300.         Debug-Output "OEMNADTK.INF: parameter confidence too low to bypass configuration"
  301.         Goto adapteroptions
  302.     Endif
  303.     Ifstr(i) $(DetectedCard) == TRUE
  304.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  305.             set BusInterfaceType = *($(!STF_NCDETINFO),5)
  306.             set BusNumber = *($(!STF_NCDETINFO),6)
  307.             Goto adapterverify
  308.         Endif
  309.     Endif
  310.     goto adapteroptions
  311. adapteroptions = +
  312.     set from = adapteroptions
  313.     ifstr(i) $(IOBaseAddress) == 2592
  314.         set IOBaseAddress = 1
  315.     else-ifstr(i) $(IOBaseAddress) == 2596
  316.         set IOBaseAddress = 2
  317.     else-ifstr(i) $(IOBaseAddress) == ""
  318.         set IOBaseAddress = 1
  319.     endif
  320.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  321.         ifstr(i) $(!AutoNetInterfaceType) != ""
  322.             set BusInterfaceType = $(!AutoNetInterfaceType)
  323.         else
  324.             set BusInterfaceType = 1    
  325.         endif
  326.         ifstr(i) $(!AutoNetBusNumber) != ""
  327.             set BusNumber = $(!AutoNetBusNumber)
  328.         else
  329.             set BusNumber = 0
  330.         endif
  331.         goto adapterverify
  332.     endif
  333.     set RadioIn = {$(IOBaseAddress)}
  334.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  335.     ui start "InputDlg"
  336.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  337.         set IOBaseAddress = *($(RadioOut),1)
  338.         set NetworkAddress = *($(EditTextOut),1)
  339.         ui pop 1
  340.     else-ifstr(i) $(DLGEVENT) == "BACK"
  341.         set CommonStatus = STATUS_USERCANCEL
  342.         Debug-Output "Action: exit. Bye."
  343.         ui pop 1
  344.         goto end
  345.     else
  346.         ui pop 1
  347.         Debug-Output "Action: unknown. Bye."
  348.         goto end
  349.     endif
  350.     ifstr(i) $(!STF_NCDETINFO) == {}
  351.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardwareDescription) $(BusInterfaceType) $(BusNumber)
  352.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  353.             Debug-Output "ShellCode error."
  354.             goto ShellCodeError
  355.         endif
  356.         set BusInterfaceType = $($R1)
  357.         set BusNumber = $($R2)
  358.     else
  359.         set BusInterfaceType = *($(!STF_NCDETINFO),5)
  360.         set BusNumber = *($(!STF_NCDETINFO),6)
  361.     endif
  362.     set Pcmcia = 0
  363.     ifstr(i) $(BusInterfaceType) == 8
  364.         set Pcmcia = 1
  365.         set Token1MMIOSize = 8192
  366.         set Token1RAMSize  = 16384
  367.         read-syms SecondDlg$(!STF_LANGUAGE)
  368.         ifstr(i) $(Token1IRQVal) == ""
  369.             set Token1IRQVal = *($(IRQList), 1)
  370.         endif
  371.         ifstr(i) $(Token1MMIO) == ""
  372.             set Token1MMIO = *($(MMIOList), 1)
  373.         endif
  374.         ifstr(i) $(Token1Speed) == ""
  375.             set Token1Speed = *($(SpeedList), 1)
  376.         endif
  377.         set Token1MMIO = *($(MMIOList), ~($(MMIODecList),+
  378.             $(Token1MMIOVal)))
  379.         set Combo1Out = $(Token1Speed)
  380.         set Combo2Out = $(Token1IRQVal)
  381.         set Combo3Out = $(Token1MMIO)
  382.         ui start "Config"
  383.         ifstr(i) $(DLGEVENT) == "CONTINUE"
  384.             set Token1Speed = $(Combo1Out)
  385.             set Token1IRQVal = $(Combo2Out)
  386.             set Token1MMIO = $(Combo3Out)
  387.             ui pop 1
  388.         else-ifstr(i) $(DLGEVENT) == "BACK"
  389.             set CommonStatus = STATUS_USERCANCEL
  390.             Debug-Output "Action: exit. Bye."
  391.             ui pop 1
  392.             goto end
  393.         else
  394.             ui pop 1
  395.             Debug-Output "Action: unknown. Bye."
  396.             goto end
  397.         endif
  398.         set Token1MMIOVal = *($(MMIODecList), ~($(MMIOList),+
  399.             $(Token1MMIO)))
  400.         Set-add Token1RAM = $(Token1MMIOVal),8192
  401.         ifstr(i) $(IOBaseAddress) == 1
  402.             set IOBaseAddress = 2592
  403.         else-ifstr(i) $(IOBaseAddress) == 2
  404.             set IOBaseAddress = 2596
  405.         else-ifstr(i) $(IOBaseAddress) == ""
  406.             set IOBaseAddress = 2592
  407.         endif
  408.     endif
  409. adapterverify =+
  410.     Ifstr(i) $(DetectedCard) != TRUE
  411.         Goto skipoptions
  412.     Endif
  413.     Debug-Output "OEMNADTK.INF: Calling Param_VerifyCard"
  414.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  415.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  416.         Debug-Output "OEMNADTK.INF: Param_VerifyCard succeeded"
  417.         Goto skipoptions
  418.     Endif
  419.     Set from = adapteroptions
  420.     Set to = skipoptions
  421.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  422.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  423.         Debug-Output "ShellCode error: cannot get an error string."
  424.         goto ShellCodeError
  425.     endif
  426.     set Error = $($R0)
  427.     Goto Warning
  428. skipoptions =+
  429.     ifint $(OldVersionExisted) == $(TRUE)
  430.         ifstr(i) $(!NTN_InstallMode) == configure
  431.             goto writeparameters
  432.         endif
  433.     endif
  434.     StartWait
  435.     ifint $(OldVersionExisted) == $(FALSE)
  436.         ifstr(i) $(!NTN_InstallMode) == "install"
  437.            Ifstr(i) $(DoCopy) == "YES"
  438.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  439.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  440.                   Goto ShellCodeError
  441.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  442.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  443.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  444.                       goto ShellCodeError
  445.                   endif
  446.                   set Error = $($R0)
  447.                   Goto fatal
  448.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  449.                   Goto successful
  450.               Endif
  451.               Set SrcDir = $($R1)
  452.            Endif
  453.            install "Install-Option"
  454.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  455.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  456.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  457.                   goto ShellCodeError
  458.               endif
  459.               set Error = $($R0)
  460.               goto fatal
  461.            endif
  462.         endif
  463.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  464.             $(ProductSoftwareName), +
  465.             $(ProductSoftwareName), +
  466.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  467.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  468.             $(NetEventDLL)
  469.         Set OEM_ABANDON_SOFTWARE = TRUE
  470.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  471.             Debug-Output "ShellCode error"
  472.             goto ShellCodeError
  473.         endif
  474.         set RegistryErrorIndex = $($R0)
  475.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  476.             EndWait
  477.             Debug-Output "Registry error: add software components"
  478.             CloseRegKey $($R1)
  479.             CloseRegKey $($R2)
  480.             CloseRegKey $($R3)
  481.             CloseRegKey $($R4)
  482.             CloseRegKey $($R5)
  483.             goto fatalregistry
  484.         endif
  485.         Set SoftProductKey      = $($R1)
  486.         Set SoftNetRuleKey      = $($R2)
  487.         Set SoftServiceKey      = $($R3)
  488.         Set SoftParameterKey    = $($R4)
  489.         Set SoftLinkageKey      = $($R5)
  490.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  491.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  492.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  493.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  494.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  495.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  496.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  497.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  498.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  499.             Debug-Output "ShellCode error."
  500.             goto ShellCodeError
  501.         endif
  502.         set RegistryErrorIndex = $($R0)
  503.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  504.             EndWait
  505.             Debug-Output "Resgitry error: add value list."
  506.             CloseRegKey $(SoftProductKey)
  507.             CloseRegKey $(SoftNetRuleKey)
  508.             CloseRegKey $(SoftServiceKey)
  509.             CloseRegKey $(SoftParameterKey)
  510.             CloseRegKey $(SoftLinkageKey)
  511.             goto fatalregistry
  512.         endif
  513.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  514.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  515.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  516.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  517.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  518.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  519.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  520.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  521.             Debug-Output "ShellCode error."
  522.             goto ShellCodeError
  523.         endif
  524.         set RegistryErrorIndex = $($R0)
  525.         CloseRegKey $(SoftProductKey)
  526.         CloseRegKey $(SoftNetRuleKey)
  527.         CloseRegKey $(SoftServiceKey)
  528.         CloseRegKey $(SoftParameterKey)
  529.         CloseRegKey $(SoftLinkageKey)
  530.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  531.             EndWait
  532.             Debug-Output "Resgitry error: add value list."
  533.             goto fatalregistry
  534.         endif
  535.     endif
  536.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  537.     ifint $($R4) != -1
  538.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  539.     endif
  540.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  541.         Debug-Output "Cannot add hardware component"
  542.         goto ShellCodeError
  543.     endif
  544.     set RegistryErrorIndex = $($R0)
  545.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  546.         EndWait
  547.         Debug-Output "Registry error: add hardware component"
  548.         CloseRegKey $($R1)
  549.         CloseRegKey $($R2)
  550.         CloseRegKey $($R3)
  551.         goto fatalregistry
  552.     endif
  553.     set KeyParameters = $($R3)
  554.     set KeyAdapterRules = $($R2)
  555.     set AdapterNumber = $($R4)
  556.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  557.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  558.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  559.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  560.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  561.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  562.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  563.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  564.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  565.         Debug-Output "ShellCode error"
  566.         goto ShellCodeError
  567.     endif
  568.     CloseRegKey $($R1)
  569.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  570.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  571.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  572.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  573.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  574.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  575.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  576.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  577.         Debug-Output "ShellCode error."
  578.         goto ShellCodeError
  579.     endif
  580.     set RegistryErrorIndex = $($R0)
  581.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  582.         EndWait
  583.         Debug-Output "Resgitry error: add value list."
  584.         CloseRegKey $(KeyParameters)
  585.         CloseRegKey $(KeyAdapterRules)
  586.         goto fatalregistry
  587.     endif
  588.     CloseRegKey $(KeyAdapterRules)
  589.     goto writeparameters
  590. writeparameters = +
  591.     ifstr(i) $(BusInterfaceType) == 8
  592.         set NewValueList = {{IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddress)},+
  593.                        {IoLength,$(NoTitle),$(!REG_VT_DWORD),7},+
  594.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  595.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  596.                        {CardType,$(NoTitle),$(!REG_VT_DWORD),1},+
  597.                        {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
  598.                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(Token1IRQVal)},+
  599.                        {RingSpeed,$(NoTitle),$(!REG_VT_DWORD),$(Token1Speed)},+
  600.                        {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(Token1MMIOVal)},+
  601.                        {MemoryMappedBaseAddress_1,$(NoTitle),$(!REG_VT_DWORD),$(Token1RAM)},+
  602.                        {PCCardMemoryWindowOffset,$(NoTitle),$(!REG_VT_DWORD),$(Token1MMIOVal)},+
  603.                        {PCCardMemoryWindowOffset_1,$(NoTitle),$(!REG_VT_DWORD),$(Token1RAM)},+
  604.                        {MemoryMappedSize,$(NoTitle),$(!REG_VT_DWORD),$(Token1MMIOSize)},+
  605.                        {MemoryMappedSize_1,$(NoTitle),$(!REG_VT_DWORD),$(Token1RAMSize)},+
  606.                        {RingSpeed,$(NoTitle),$(!REG_VT_DWORD),$(Token1Speed)},+
  607.                        {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),$(Pcmcia)}}
  608.     else
  609.         set NewValueList = {{IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddress)},+
  610.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  611.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  612.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),2},+
  613.                        {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
  614.                        {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),$(Pcmcia)}}
  615.     endif
  616.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  617.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  618.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  619.     endif
  620.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  621.         Debug-Output "ShellCode error."
  622.         goto ShellCodeError
  623.     endif
  624.     set RegistryErrorIndex = $($R0)
  625.     CloseRegKey $(KeyParameters)
  626.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  627.         Debug-Output "Registry error: Add value list"
  628.         goto fatalregistry
  629.     endif
  630.     EndWait
  631.     goto successful
  632. bindingadapter =+
  633.     set Error = "Binding: Sorry, not yet implemented."
  634.     goto fatal
  635. removeadapter = +
  636.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  637.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  638.             $(ProductSoftwareName)
  639.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  640.             Debug-Output "ShellCode error"
  641.             goto ShellCodeError
  642.         endif
  643.         set RegistryErrorIndex = $($R0)
  644.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  645.             goto fatalregistry
  646.         endif
  647.     else
  648.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  649.             $(ProductSoftwareName), $(!NTN_RegBase)
  650.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  651.             Debug-Output "ShellCode error"
  652.             goto ShellCodeError
  653.         endif
  654.         set RegistryErrorIndex = $($R0)
  655.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  656.             goto fatalregistry
  657.         endif
  658.     endif
  659.     goto end
  660. UpgradeSoftware = +
  661.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  662.     Ifstr $(KeyProduct) != $(KeyNull)
  663.         install "Install-Update"
  664.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  665.             goto fatal
  666.         endif
  667.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  668.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  669.         CloseRegKey $(KeyProduct)
  670.     else
  671.         goto fatalregistry
  672.     endif
  673.     set iSearch = 1
  674. nextnetcard = +
  675.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  676.     set KeyNetcard = $($R0)
  677.     set iSearch = $($R1)
  678.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  679.     Ifstr $(KeyNetcard) != $(KeyNull)
  680.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  681.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  682.         CloseRegKey $(KeyNetcard)
  683.         goto nextnetcard
  684.     Endif
  685.     goto end
  686. successful = +
  687.     goto end
  688. abandon = +
  689.     ForListDo $(OEM_ABANDON_OPTIONS)
  690.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  691.             $(ProductSoftwareName), $($)
  692.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  693.             Debug-Output "ShellCode error"
  694.             goto ShellCodeError
  695.         endif
  696.         set RegistryErrorIndex = $($R0)
  697.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  698.             goto fatalregistry
  699.         endif
  700.     EndForListDo
  701.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  702.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  703.             $(ProductSoftwareName), FALSE
  704.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  705.             Debug-Output "ShellCode error"
  706.             goto ShellCodeError
  707.         endif
  708.         set RegistryErrorIndex = $($R0)
  709.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  710.             goto fatalregistry
  711.         endif
  712.     endif
  713.     goto end
  714. warning = +
  715.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  716.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  717.         goto ShellCodeError
  718.     endif
  719.     ifstr(i) $($R1) == "OK"
  720.         goto $(to)
  721.     else-ifstr(i) $($R1) == "CANCEL"
  722.         goto $(from)
  723.     else
  724.         goto "end"
  725.     endif
  726. nonfatalinfo = +
  727.     Set CommonStatus = STATUS_USERCANCEL
  728.     Set Severity = STATUS
  729.     goto nonfatalmsg
  730. nonfatal = +
  731.     Set Severity = NONFATAL
  732.     goto nonfatalmsg
  733. nonfatalmsg = +
  734.     ifstr(i) $(Error) == ""
  735.         Set Severity = NONFATAL
  736.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  737.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  738.             goto ShellCodeError
  739.         endif
  740.         set Error = $($R0)
  741.     endif
  742.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  743.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  744.         goto ShellCodeError
  745.     endif
  746.     ifstr(i) $($R1) == "OK"
  747.         goto $(from)
  748.     else
  749.         goto "end"
  750.     endif
  751. fatalregistry = +
  752.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  753.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  754.         goto ShellCodeError
  755.     endif
  756.     set Error = $($R0)
  757.     goto fatal
  758. fataldetect = +
  759.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  760.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  761.         Debug-Output "ShellCode error: cannot get an error string."
  762.         goto ShellCodeError
  763.     endif
  764.     set Error = $($R0)
  765.     Goto fatal
  766. fatal = +
  767.     ifstr(i) $(Error) == ""
  768.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  769.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  770.             goto ShellCodeError
  771.         endif
  772.         set Error = $($R0)
  773.     endif
  774.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  775.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  776.         goto ShellCodeError
  777.     endif
  778.     goto setfailed
  779. ShellCodeError = +
  780.     set DlgType      = "MessageBox"
  781.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  782.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  783.     set STF_MB_TYPE  = 1
  784.     set STF_MB_ICON  = 3
  785.     set STF_MB_DEF   = 1
  786.     ui start "Error Message"
  787.     goto setfailed
  788. setfailed = +
  789.     set CommonStatus = STATUS_FAILED
  790.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  791.         set OEM_ABANDON_ON = FALSE
  792.         goto abandon
  793.     endif
  794.     goto end
  795. end = +
  796.     goto term
  797. term = +
  798.     Return $(CommonStatus)
  799. [Install-Option]
  800.     set STF_VITAL = ""
  801.     ifstr(i) $(AddCopy) == "YES"
  802.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  803.     endif
  804.     ifstr(i) $(DoCopy) == "YES"
  805.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  806.        CopyFilesInCopyList
  807.     endif
  808.     ifstr(i) $(DoConfig) == "YES"
  809.     endif
  810.     Exit
  811. [Install-Update]
  812.    set STF_VITAL        = ""
  813.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  814.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  815.    exit
  816. [Source Media Descriptions]
  817.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  818. [Signature]
  819.     FileType = MICROSOFT_FILE
  820. [GetSignature]
  821.     read-syms Signature
  822.     return $(FileType)
  823. [ProductType]
  824. STF_PRODUCT  = LanmanNT
  825. STF_PLATFORM = I386
  826. [Files-Inf]
  827. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  828. [Files-IBMTok]
  829. 1,IBMTOK.SYS , SIZE=999
  830. [LanguagesSupported]
  831.     ENG
  832. [OptionsTextENG]
  833.     IBMTOK     = "IBM Token Ring (ISA/PCMCIA) Adapter"
  834. [FileConstantsENG]
  835. ProCaption   = "Windows NT Setup"
  836. ProCancel    = "Cancel"
  837. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  838.                "Are you sure you want to cancel copying files?"
  839. ProCancelCap = "Network Setup Message"
  840. ProText1     = "Copying:"
  841. ProText2     = "To:"
  842. FunctionTitle   = "IBM Token Ring Adapter Card Setup"
  843. FunctionTitle1   = "IBM Token Ring PCMCIA Adapter Card Setup"
  844. ProductSoftwareDescription      = "IBM Token Ring (ISA/PCMCIA) Adapter Driver"
  845. ProductHardwareDescription      = "IBM Token Ring (ISA/PCMCIA) Adapter"
  846. ProductSoftwareTitle    = "IBM Token Ring Adapter (ISA/PCMCIA) Driver"
  847. ProductHardwareTitle    = "IBM Token Ring (ISA/PCMCIA) Adapter"
  848. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  849. ShellCodeErrorText      = "Shell Code Error."
  850. [DialogConstantsENG]
  851. Help        = "&Help"
  852. Exit        = "Cancel"
  853. OK          = "OK"
  854. HelpContext = ""
  855. Continue    = "Continue"
  856. Cancel      = "Cancel"
  857. [FileDependentDlgENG]
  858. Group1 = "I/O Port Base Address"
  859. Radio1 = "&Primary"
  860. Radio2 = "&Secondary"
  861. Edit1Label = "&Network Address:"
  862. DlgType = "RadioCombination"
  863. DlgTemplate = "IBM_TOKEN"
  864. Caption = $(FunctionTitle)
  865. ComboListItemsIn = {}
  866. ComboListItemsOut = {}
  867. EditTextLim = 17
  868. EditTextIn = $(NetworkAddress)
  869. OptionsGreyed = {}
  870. HelpContext = $(!IDH_DB_OEMNADTK_INS)
  871. RCCtlFocusOn = 403
  872. [SecondDlgENG]
  873. Group1 = "Network Speed"
  874. HelpContext = 1
  875. Caption = $(FunctionTitle1)
  876. Combo1Label = "Network &Speed:"
  877. Combo2Label = "Card &IRQ Level:"
  878. Combo3Label = "Memory &Base:"
  879. Combo1List = $(SpeedList)
  880. Combo1Out = $(Token1Speed)
  881. Combo2List = $(IRQList)
  882. Combo2Out = $(Token1IRQVal)
  883. Combo3List = $(MMIOList)
  884. Combo3Out = $(Token1MMIO)
  885. DlgType = Combination
  886. DlgTemplate = "WD"
  887. ComboListItemsIn = {Combo1List, Combo2List, Combo3List}
  888. ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  889. CBOptionsGreyed = {}
  890. EditTextIn = ""
  891. EditTextLim = ""
  892. NotifyFields = {NO, NO, NO}
  893. HelpContext = 1
  894.